<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form action="UpdateServlet" method="post" onsubmit="return check()">
		<table>
			<tr>
				<th style="font-size: 20px;">学员信息</th>
			</tr>
			<tr>
				<td>学员姓名</td>
				<td><input type = "text" name = "sname" id = "sname" value="${stuInfo.sname }"></td>
			</tr>
			<tr>
				<td>学员性别</td>
				<td><input type = "text" name = "sgender" id = "sgender" value="${stuInfo.sgender }"></td>
			</tr>
			<tr>
				<td>学员年龄</td>
				<td><input type = "text" name = "sage" id = "sage" value="${stuInfo.sage }"></td>
			</tr>
			<tr>
				<td>家庭住址</td>
				<td><input type = "text" name = "saddress" id = "saddress" value="${stuInfo.saddress }"></td>
			</tr>
			<tr>
				<td>Email</td>
				<td><input type = "text" name = "semail" id = "semail" value="${stuInfo.semail }"></td>
			</tr>
			<tr>
				<td><input type = "submit" value="修改"></td>
			</tr>
		</table>
		<input type = "hidden" name = "sid" value="${stuInfo.sid }">
	</form>
	
	<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
	<script type="text/javascript">
		function check() {
			var sname = $("#sname").val();
			var sgender = $("#sgender").val();
			var sage = $("#sage").val;
			if (sname == "") {
				alert("学员姓名不能为空")
				return false;
			}
			if (sgender == "") {
				alert("学员性别不能为空")
				return false;
			}
			if (sage == "") {
				alert("学员年龄不能为空")
				return false;
			}
			return true;
		}
	</script>
</body>
</html>